export const tableColumns = [
  {
    key: 'operation1',
    name: '生效状态',
    visible: true,
    width: 100,
  },
  {
    key: 'targetVisit',
    name: '目标访视',
    visible: true,
    width: 100,
  },
  {
    key: 'targetTable',
    name: '目标表',
    visible: true,
  },
  {
    key: 'targetVariable',
    name: '目标变量',
    visible: true,
    width: 120,
  },
  {
    key: 'sourceTable',
    name: '源表',
    visible: true,
  },
  {
    key: 'sourceCondition',
    name: '源表查询条件',
    visible: true,
    width: 80,
  },
  {
    key: 'getterType',
    name: '取值函数',
    visible: true,
  },
  {
    key: 'functionParameters',
    name: '函数参数',
    visible: true,
  },
]
export const getterTypeObject = {
  1: '等于固定值',
  2: '等于',
  3: '当前年龄',
  4: '获取指定年龄',
  5: '求和',
  6: '等求均值',
  7: '获取最大值',
  8: '获取最小值',
  9: '自定义函数',
}

export const getterTypeList = [
  {
    text: '等于固定值',
    value: '1',
  },
  {
    text: '等于',
    value: '2',
  },
  {
    text: '当前年龄',
    value: '3',
  },
  {
    text: '获取指定年龄',
    value: '4',
  },
  {
    text: '求和',
    value: '5',
  },
  {
    text: '等求均值',
    value: '6',
  },
  {
    text: '获取最大值',
    value: '7',
  },
  {
    text: '获取最小值',
    value: '8',
  },
  {
    text: '自定义函数',
    value: '9',
  },
]

export const getterTypeListEnums = {
  1: '等于固定值',
  2: '等于',
  3: '当前年龄',
  4: '获取指定年龄',
  5: '求和',
  6: '等求均值',
  7: '获取最大值',
  8: '获取最小值',
  9: '自定义函数',
}

export const comparatorOptions = [
  { label: '等于', value: '==' },
  { label: '不等于', value: '!=' },
  { label: '为空', value: '为空' },
  { label: '不为空', value: '不为空' },
  { label: '大于', value: '>' },
  { label: '小于', value: '<' },
  { label: '大于等于', value: '>=' },
  { label: '小于等于', value: '<=' },
]

export const comparatorOptionsEnums = {
  '==': '等于',
  '!=': '不等于',
  为空: '为空',
  不为空: '不为空',
  '>': '大于',
  '<': '小于',
  '>=': '大于等于',
  '<=': '小于等于',
}

export const defaultFormData = {
  operation: '0',
  associationType: '1',
  // 目标访视
  targetVisitId: '',
  targetVisit: '',
  // 目标表
  targetTable: '',
  targetTableId: '',
  targetTableCrf: '',
  // 目标变量
  targetVariable: '',
  targetVariableCrf: '',

  targetTabfunctionParametersle: '',

  getterType: '',
  sourceVisit: '',
  sourceVisitId: '',
  sourceTable: '',
  sourceTableId: '',
  sourceCondition: '',
  sourceRule: '',
  sourceTableCrf: '',
  sourceVariableCrf: '',
  sourceConditionRemark: '',
  // 函数参数
  functionRule: '',
  functionParameters: '',
  functionParametersRemark: '',
}

export const functionParameterTwo = {
  tableOneValue: '',
  tableOneOptions: [],
  wordOneValue: '',
  wordOneOptions: [],
  tableTwoValue: '',
  tableTwoOptions: [],
  wordTwoValue: '',
  wordTwoOptions: [],
}
